Skip to content

[Fix] 버그 수정#442

Merged
david-parkk merged 4 commits intodevelopfrom
fix/#441
Feb 24, 2026
Merged

[Fix] 버그 수정#442
david-parkk merged 4 commits intodevelopfrom
fix/#441

Conversation

@david-parkk
Copy link
Contributor

@david-parkk david-parkk commented Feb 24, 2026

#️⃣ 연관된 이슈

closes #441

📝작업 내용

  • 버그 수정

작업 상세 내용

상세 내용을 입력해주세요.

💬리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

Summary by CodeRabbit

Bug Fixes

  • 알림 데이터의 ID 식별 로직을 개선하여 알림 정보 추적의 정확성을 향상시켰습니다.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

개요

GetAlarmDto의 from(UserAnnouncement) 메서드에서 id 값의 출처를 announcement.getId()에서 userAnnouncement.getId()로 변경했습니다. 다른 모든 필드는 기존 매핑을 유지합니다.

변경 사항

코호트 / 파일 요약
알람 DTO 버그 수정
src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java
UserAnnouncement로부터 DTO 생성 시 id 필드의 출처를 announcement.getId()에서 userAnnouncement.getId()로 변경하여 공지사항 관련 알림 읽기 기능 수정

예상 코드 리뷰 소요 시간

🎯 1 (Trivial) | ⏱️ ~3분

추천 리뷰어

  • kmw10693

🐰 한 줄의 변경이 버그를 잡고,
알람이 제대로 울려 퍼지네!
공지사항은 이제 읽혀지고,
작은 수정이 큰 웃음 짓게 한다. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description template requirements are not met. The '작업 상세 내용' section is empty, and '리뷰 요구사항' section is also incomplete. 상세 내용 섹션에 버그의 원인(announcement.getId()에서 userAnnouncement.getId()로 변경)과 해결 방법을 명확히 작성하세요.
Title check ❓ Inconclusive The title '[Fix] 버그 수정' is vague and generic, lacking specific details about what bug was fixed or which component was affected. 더 구체적인 제목으로 변경하세요. 예: '[Fix] 공지사항 알림 조회 시 ID 매핑 오류 수정' 또는 '[Fix] GetAlarmDto의 userAnnouncement ID 매핑 버그 수정'
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR changes align with issue #441: fixing the bug preventing announcement-related alarm reading by correcting the ID mapping in GetAlarmDto.from(UserAnnouncement).
Out of Scope Changes check ✅ Passed The single-line change in GetAlarmDto is directly scoped to fixing the alarm reading bug mentioned in issue #441, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#441

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java (1)

33-33: getAnnouncement() 중복 호출 제거 권장

Line 29에서 이미 announcement 로컬 변수에 할당했음에도 Line 33에서 userAnnouncement.getAnnouncement()를 재호출하고 있습니다. 일관성과 가독성을 위해 로컬 변수를 재사용하는 것이 좋습니다.

♻️ 중복 호출 제거 제안
-                .alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory())
+                .alarmCategory(announcement.getAlarmType().getAlarmCategory())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java` at
line 33, GetAlarmDto builder is re-calling userAnnouncement.getAnnouncement()
even though a local variable announcement was already assigned; replace the
duplicate call in the builder chain (the .alarmCategory(...) argument) with the
existing announcement local variable to use the cached reference (i.e., change
.alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory())
to use announcement.getAlarmType().getAlarmCategory()) so the code is consistent
and avoids redundant calls.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java`:
- Line 33: GetAlarmDto builder is re-calling userAnnouncement.getAnnouncement()
even though a local variable announcement was already assigned; replace the
duplicate call in the builder chain (the .alarmCategory(...) argument) with the
existing announcement local variable to use the cached reference (i.e., change
.alarmCategory(userAnnouncement.getAnnouncement().getAlarmType().getAlarmCategory())
to use announcement.getAlarmType().getAlarmCategory()) so the code is consistent
and avoids redundant calls.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e89255b and fd1a752.

📒 Files selected for processing (1)
  • src/main/java/ku_rum/backend/domain/alarm/dto/response/GetAlarmDto.java

@github-actions
Copy link

Test Results

 38 files   38 suites   12s ⏱️
173 tests 173 ✅ 0 💤 0 ❌
174 runs  174 ✅ 0 💤 0 ❌

Results for commit fd1a752.

@david-parkk david-parkk merged commit 6140d38 into develop Feb 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

공지사항 관련 알림 읽기 버그

1 participant